package com.mobilebook.backend.dao.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.mobilebook.backend.dao.AdminUserDao;
import com.mobilebook.backend.objects.AdminUser;

public class AdminUserDaoImpl extends SqlMapClientDaoSupport implements AdminUserDao{

	@Override
	public AdminUser getAdminByAccount(String userAccount) {
		return (AdminUser) this.getSqlMapClientTemplate().queryForObject("getAdminByAccount",userAccount);
	}

	@Override
	public AdminUser checkAdminUser(String userAccount, String password) {
		Map map = new HashMap();
		map.put("useraccount", userAccount);
		map.put("password", password);
		return (AdminUser) this.getSqlMapClientTemplate().queryForObject("checkAdminUser",map);
	}

}
